/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package dataaccess;

/**
 *
 * @author littlechild
 */
public class DataSourceFactory {
    private static IDataSource ds=null;
    public static IDataSource getDataSource(String className) throws ClassNotFoundException, IllegalAccessException, InstantiationException{
        if(ds == null) 
            ds=(IDataSource)Class.forName(className).newInstance();
        return ds;
    }
}
